--------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Volumes/rdss_meghrogers/Current Research/Markets-Pridemore/Work/MA
> R03-MedModel-UNODC.log
  log type:  text
 opened on:   5 May 2025, 14:10:22

. 
. //  program:    Stata 
. //  task:       Sample and diagnostics 
. //  project:    Markets  
. 
. version
version 18.5

. clear all

. macro drop _all

. set linesize 80

. set more off

. local tag " 07-05-23| Cleaned 06-06-24"

. local file "MAR03-MedModel-UNODC"

. local note "|`tag' | `file'"

. local opt "noparen sideway excel noaster  bdec(2)  sdec(2)  pdec(3)   adec(2) 
> e(r2) stats(coef se pval)"

. local dv "lrhom_un"

. local iv "fraser"

. local iv2 "infantmort" 

. local cont " edu unemp  popdense perurban  sexratio"

. local cont2 " gini edu unemp  popdense perurban  sexratio"

. local icid " i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i1
> 9 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 
> i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i5
> 8 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 
> i78 i79 i80 i81 i82 i83 i84 i85  i87 i88"

. local iyear " x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x
> 19 "

. 
. //      #0
. //      Loading data 
. use MAR02-SampDiag-UNODC.dta, clear 

. 
. //      #1
. //      Xtset up 
. xtset CID year 

Panel variable: CID (unbalanced)
 Time variable: year, 2000 to 2019, but with gaps
         Delta: 1 unit

. 
. //      #2
. //      mediation model set up (nation fixed effects)
. tab CID, gen(i)

        CID |      Freq.     Percent        Cum.
------------+-----------------------------------
          8 |         20        1.03        1.03
         12 |         14        0.72        1.74
         31 |         12        0.62        2.36
         32 |         19        0.97        3.34
         36 |         20        1.03        4.36
         40 |         20        1.03        5.39
         44 |         20        1.03        6.41
         48 |         15        0.77        7.18
         50 |         19        0.97        8.16
         51 |         16        0.82        8.98
         52 |         20        1.03       10.01
         64 |          6        0.31       10.31
         68 |          5        0.26       10.57
         70 |         13        0.67       11.24
         72 |         10        0.51       11.75
         76 |         20        1.03       12.78
         84 |         20        1.03       13.80
        100 |         20        1.03       14.83
        104 |         20        1.03       15.85
        108 |          5        0.26       16.11
        120 |         12        0.62       16.73
        124 |         20        1.03       17.75
        132 |          7        0.36       18.11
        144 |         14        0.72       18.83
        152 |         16        0.82       19.65
        156 |         18        0.92       20.57
        170 |         20        1.03       21.60
        188 |         20        1.03       22.63
        191 |         20        1.03       23.65
        196 |         19        0.97       24.63
        203 |         19        0.97       25.60
        208 |         13        0.67       26.27
        214 |         19        0.97       27.24
        218 |         16        0.82       28.07
        222 |         20        1.03       29.09
        233 |         16        0.82       29.91
        242 |         12        0.62       30.53
        246 |         20        1.03       31.55
        250 |         20        1.03       32.58
        268 |         12        0.62       33.20
        276 |         20        1.03       34.22
        288 |         19        0.97       35.20
        300 |         18        0.92       36.12
        320 |         18        0.92       37.04
        328 |         20        1.03       38.07
        332 |         11        0.56       38.64
        340 |         20        1.03       39.66
        348 |         20        1.03       40.69
        352 |         16        0.82       41.51
        356 |         20        1.03       42.53
        372 |         20        1.03       43.56
        376 |         20        1.03       44.59
        380 |         18        0.92       45.51
        388 |         20        1.03       46.54
        392 |         20        1.03       47.56
        398 |          9        0.46       48.02
        400 |         13        0.67       48.69
        404 |         15        0.77       49.46
        410 |         20        1.03       50.49
        414 |         15        0.77       51.26
        422 |         10        0.51       51.77
        428 |         11        0.56       52.33
        440 |         19        0.97       53.31
        442 |         19        0.97       54.28
        454 |         13        0.67       54.95
        458 |         20        1.03       55.98
        470 |         18        0.92       56.90
        480 |         12        0.62       57.52
        484 |         20        1.03       58.54
        496 |         16        0.82       59.36
        498 |         15        0.77       60.13
        499 |         13        0.67       60.80
        504 |         20        1.03       61.83
        508 |          9        0.46       62.29
        512 |         18        0.92       63.21
        516 |         11        0.56       63.78
        524 |         20        1.03       64.80
        528 |         20        1.03       65.83
        554 |         20        1.03       66.85
        558 |         20        1.03       67.88
        578 |         19        0.97       68.86
        586 |         20        1.03       69.88
        591 |         20        1.03       70.91
        598 |         10        0.51       71.42
        600 |         20        1.03       72.45
        604 |          9        0.46       72.91
        608 |         13        0.67       73.58
        616 |         15        0.77       74.35
        620 |         14        0.72       75.06
        634 |         10        0.51       75.58
        642 |         20        1.03       76.60
        643 |         20        1.03       77.63
        646 |         12        0.62       78.25
        688 |         15        0.77       79.01
        690 |          6        0.31       79.32
        694 |         10        0.51       79.84
        702 |         19        0.97       80.81
        703 |         20        1.03       81.84
        704 |          9        0.46       82.30
        705 |         20        1.03       83.32
        710 |         20        1.03       84.35
        716 |         10        0.51       84.86
        724 |         20        1.03       85.89
        740 |          7        0.36       86.25
        748 |          8        0.41       86.66
        752 |         20        1.03       87.69
        756 |         14        0.72       88.40
        760 |         11        0.56       88.97
        764 |         12        0.62       89.58
        780 |         20        1.03       90.61
        784 |          7        0.36       90.97
        788 |          9        0.46       91.43
        792 |         14        0.72       92.15
        800 |         12        0.62       92.77
        804 |         16        0.82       93.59
        807 |         16        0.82       94.41
        818 |         14        0.72       95.13
        826 |         20        1.03       96.15
        834 |         11        0.56       96.72
        840 |         17        0.87       97.59
        858 |         20        1.03       98.61
        862 |         18        0.92       99.54
        894 |          9        0.46      100.00
------------+-----------------------------------
      Total |      1,949      100.00

. 
. //      #3
. //      mediator model set up (time fixed effects) 
. tab year, gen(x) 

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       2000 |         78        4.00        4.00
       2001 |         82        4.21        8.21
       2002 |         84        4.31       12.52
       2003 |         74        3.80       16.32
       2004 |         83        4.26       20.57
       2005 |         87        4.46       25.04
       2006 |         89        4.57       29.60
       2007 |         99        5.08       34.68
       2008 |        104        5.34       40.02
       2009 |        104        5.34       45.36
       2010 |        115        5.90       51.26
       2011 |        108        5.54       56.80
       2012 |        110        5.64       62.44
       2013 |        101        5.18       67.62
       2014 |        104        5.34       72.96
       2015 |        105        5.39       78.35
       2016 |        105        5.39       83.74
       2017 |        107        5.49       89.23
       2018 |        104        5.34       94.56
       2019 |        106        5.44      100.00
------------+-----------------------------------
      Total |      1,949      100.00

. 
. //      #4
. //      Mediation Model `iv' through infant mort to `dv' nation fixed effects
. sem (`iv'-> `iv2' , ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv'
> )  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: infantmort lrhom_un

Exogenous variables
  Observed: fraser edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:  Log pseudolikelihood =  123456.61  
Iteration 1:  Log pseudolikelihood =  123456.61  

Structural equation model                                Number of obs = 1,949
Estimation method: ml

Log pseudolikelihood = 123456.61

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
       fraser |  -11.41203    1.90817    -5.98   0.000    -15.15198   -7.672089
        _cons |   98.02308   14.34725     6.83   0.000     69.90299    126.1432
  ------------+----------------------------------------------------------------
  lrhom_un    |
   infantmort |   .0124055   .0162491     0.76   0.445    -.0194422    .0442531
       fraser |  -.3144694   .1246938    -2.52   0.012    -.5588648    -.070074
          edu |  -1.820196   1.281763    -1.42   0.156    -4.332405     .692013
        unemp |   .0051139   .0235748     0.22   0.828    -.0410919    .0513196
     popdense |  -.0002844   .0000467    -6.09   0.000     -.000376   -.0001928
     perurban |   .0192599   .0089811     2.14   0.032     .0016572    .0368625
     sexratio |  -.0128423   .0019432    -6.61   0.000    -.0166509   -.0090337
           i1 |   .4015731   .2470274     1.63   0.104    -.0825918     .885738
           i2 |  -2.108874   .3208618    -6.57   0.000    -2.737751   -1.479996
           i3 |  -.7692935   .2509992    -3.06   0.002    -1.261243    -.277344
           i4 |  -.1515877   .3800438    -0.40   0.690    -.8964599    .5932845
           i5 |  -.4744637   .3684001    -1.29   0.198    -1.196515    .2475872
           i6 |  -.8767002   .2693087    -3.26   0.001    -1.404536   -.3488649
           i7 |   1.560329   .2611007     5.98   0.000     1.048581    2.072076
           i8 |  -.9721625   .1656409    -5.87   0.000    -1.296813   -.6475123
           i9 |  -.4218908    .344495    -1.22   0.221    -1.097089     .253307
          i10 |  -.2560012   .2898289    -0.88   0.377    -.8240554    .3120531
          i11 |    1.64541   .3386072     4.86   0.000     .9817517    2.309067
          i12 |  -.8158898   .3141721    -2.60   0.009    -1.431656   -.2001238
          i13 |  -.0274911   .2683987    -0.10   0.918    -.5535429    .4985606
          i14 |  -.6876444   .4390602    -1.57   0.117    -1.548186    .1728978
          i15 |   .9436884    .496634     1.90   0.057    -.0296964    1.917073
          i16 |   1.250027   .3066507     4.08   0.000     .6490026    1.851051
          i17 |   2.317829   .2229083    10.40   0.000     1.880937    2.754722
          i18 |  -.4901092   .2005096    -2.44   0.015    -.8831008   -.0971176
          i19 |   -1.71009   .4587521    -3.73   0.000    -2.609227   -.8109519
          i20 |   .1884057   .4426974     0.43   0.670    -.6792652    1.056077
          i21 |  -1.016348   .6894647    -1.47   0.140    -2.367674    .3349776
          i22 |  -.2739253   .2669015    -1.03   0.305    -.7970427    .2491921
          i23 |   .7317865   .2365078     3.09   0.002     .2682398    1.195333
          i24 |   .9490651   .4856848     1.95   0.051    -.0028595     1.90099
          i25 |  -.0189087    .260483    -0.07   0.942     -.529446    .4916286
          i26 |  -1.361541   .3013478    -4.52   0.000    -1.952172   -.7709101
          i27 |    1.73778   .2573252     6.75   0.000     1.233432    2.242128
          i28 |   1.022379   .2046762     5.00   0.000     .6212213    1.423537
          i29 |  -.7638324   .2505296    -3.05   0.002    -1.254861   -.2728033
          i30 |  -.8650289   .2090807    -4.14   0.000     -1.27482   -.4552383
          i31 |  -.8286282   .2270617    -3.65   0.000    -1.273661   -.3835955
          i32 |   -.832229   .3122762    -2.67   0.008    -1.444279   -.2201789
          i33 |   1.204002   .2959792     4.07   0.000     .6238937    1.784111
          i34 |   .8515608   .2293703     3.71   0.000     .4020033    1.301118
          i35 |   2.625607   .2500856    10.50   0.000     2.135448    3.115765
          i36 |   .7367747   .2619558     2.81   0.005     .2233509    1.250199
          i37 |  -.1623961   .2175964    -0.75   0.455    -.5888773    .2640851
          i38 |  -.1825401   .2932898    -0.62   0.534    -.7573777    .3922974
          i39 |  -.7605687   .2173571    -3.50   0.000    -1.186581   -.3345566
          i40 |    .625973   .3175285     1.97   0.049     .0036287    1.248317
          i41 |  -.6196651   .2773515    -2.23   0.025    -1.163264   -.0760661
          i42 |   -1.19644   .3884841    -3.08   0.002    -1.957855   -.4350251
          i43 |  -1.125135   .2820387    -3.99   0.000    -1.677921   -.5723493
          i44 |   2.064117   .3291839     6.27   0.000     1.418929    2.709306
          i45 |   1.651292   .2993263     5.52   0.000     1.064623    2.237961
          i46 |  -.0963481    .560517    -0.17   0.864    -1.194941    1.002245
          i47 |   2.544556   .3035759     8.38   0.000     1.949559    3.139554
          i48 |  -.5185942   .2114471    -2.45   0.014    -.9330229   -.1041654
          i49 |  -1.668933   .3086393    -5.41   0.000    -2.273855   -1.064011
          i50 |  -.0722079   .3591088    -0.20   0.841    -.7760483    .6316325
          i51 |  -.3863319   .2979393    -1.30   0.195    -.9702823    .1976185
          i52 |  -.5186044    .285643    -1.82   0.069    -1.078454    .0412456
          i53 |  -1.053282   .2094457    -5.03   0.000    -1.463788   -.6427762
          i54 |   2.888059   .1973935    14.63   0.000     2.501175    3.274943
          i55 |  -1.982489   .2582546    -7.68   0.000    -2.488659   -1.476319
          i56 |   .9231316   .2417861     3.82   0.000     .4492395    1.397024
          i57 |    -1.1377   .3257507    -3.49   0.000    -1.776159   -.4992399
          i58 |   .2724075   .3626895     0.75   0.453    -.4384508    .9832657
          i59 |  -1.107186   .2373405    -4.66   0.000    -1.572365   -.6420076
          i60 |  -1.073939   .3564768    -3.01   0.003    -1.772621   -.3752576
          i61 |  -.3177425   .2875243    -1.11   0.269    -.8812798    .2457948
          i62 |   .6037784    .256167     2.36   0.018     .1017004    1.105856
          i63 |   1.053635   .2582856     4.08   0.000     .5474048    1.559866
          i64 |  -1.312971   .2561353    -5.13   0.000    -1.814987   -.8109554
          i65 |  -.6498015    .540281    -1.20   0.229    -1.708733    .4091298
          i66 |  -.6894979   .2577742    -2.67   0.007    -1.194726   -.1842698
          i67 |  -.8101326   .2360013    -3.43   0.001    -1.272687   -.3475786
          i68 |   .4383933   .3041651     1.44   0.149    -.1577593    1.034546
          i69 |   1.011095    .265963     3.80   0.000     .4898166    1.532372
          i70 |   .7903303   .2397907     3.30   0.001     .3203492    1.260311
          i71 |    .823009   .2635051     3.12   0.002     .3065485    1.339469
          i72 |      .0276   .3060875     0.09   0.928    -.5723206    .6275206
          i73 |  -1.571509   .2583278    -6.08   0.000    -2.077822   -1.065196
          i74 |  -1.119205   .7068971    -1.58   0.113    -2.504698    .2662878
          i75 |  -.8024513   .1890785    -4.24   0.000    -1.173038   -.4318642
          i76 |     1.1608   .4058404     2.86   0.004     .3653672    1.956232
          i77 |  -.3159269   .4053357    -0.78   0.436     -1.11037    .4785165
          i78 |   -.958598   .2639393    -3.63   0.000     -1.47591   -.4412864
          i79 |   -.581785   .3452646    -1.69   0.092    -1.258491    .0949212
          i80 |   .8994126   .2471835     3.64   0.000     .4149418    1.383883
          i81 |  -1.126595   .2816463    -4.00   0.000    -1.678612   -.5745784
          i82 |  -.5614532   .5829109    -0.96   0.335    -1.703938    .5810311
          i83 |   1.296008   .1960854     6.61   0.000     .9116876    1.680328
          i84 |    .663309    .441067     1.50   0.133    -.2011665    1.527785
          i85 |   1.214905   .1998946     6.08   0.000     .8231189    1.606691
          i87 |   .9856428   .2421305     4.07   0.000     .5110758     1.46021
          i88 |  -.9012182   .2399598    -3.76   0.000    -1.371531   -.4309057
        _cons |   4.566691   1.650358     2.77   0.006     1.332048    7.801333
--------------+----------------------------------------------------------------
var(e.infan~t)|   225.5727   45.74222                      151.5925    335.6568
var(e.lrhom~n)|    .329789   .0716313                      .2154528    .5048009
-------------------------------------------------------------------------------

. outreg2 using `file', replace `opt'  addnote(`iv'->`iv2')
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #5
. //      Mediation Model Frasher through infant mort to `dv' nation & year fixe
> d effects 
. sem ( `iv'-> `iv2', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' `iyear
> ' ->`dv')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: infantmort lrhom_un

Exogenous variables
  Observed: fraser edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88 x1 x2
            x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19

Fitting target model:
Iteration 0:  Log pseudolikelihood =  129899.38  
Iteration 1:  Log pseudolikelihood =  129899.38  

Structural equation model                                Number of obs = 1,949
Estimation method: ml

Log pseudolikelihood = 129899.38

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
       fraser |  -11.41203    1.90817    -5.98   0.000    -15.15198   -7.672089
        _cons |   98.02308   14.34725     6.83   0.000     69.90299    126.1432
  ------------+----------------------------------------------------------------
  lrhom_un    |
   infantmort |   .0122073   .0162925     0.75   0.454    -.0197253      .04414
       fraser |  -.3157791    .123139    -2.56   0.010    -.5571271   -.0744312
          edu |  -1.965392   1.435257    -1.37   0.171    -4.778443    .8476594
        unemp |   .0048577   .0241135     0.20   0.840    -.0424039    .0521193
     popdense |  -.0002859   .0000463    -6.18   0.000    -.0003766   -.0001953
     perurban |   .0198165   .0092208     2.15   0.032      .001744     .037889
     sexratio |  -.0130745   .0020133    -6.49   0.000    -.0170206   -.0091285
           i1 |    .409163   .2495635     1.64   0.101    -.0799725    .8982984
           i2 |  -2.136319   .3298169    -6.48   0.000    -2.782748   -1.489889
           i3 |   -.783843   .2503141    -3.13   0.002     -1.27445   -.2932364
           i4 |  -.1557173    .376976    -0.41   0.680    -.8945766     .583142
           i5 |  -.4454871   .3986054    -1.12   0.264    -1.226739    .3357651
           i6 |  -.8593999   .2888693    -2.98   0.003    -1.425573   -.2932264
           i7 |   1.554077   .2604854     5.97   0.000     1.043535    2.064619
           i8 |    -.98902     .16549    -5.98   0.000    -1.313374   -.6646656
           i9 |  -.4380389   .3585783    -1.22   0.222    -1.140839    .2647617
          i10 |  -.2566098   .2923192    -0.88   0.380    -.8295449    .3163253
          i11 |    1.66963   .3554922     4.70   0.000     .9728778    2.366381
          i12 |  -.8302602   .3412869    -2.43   0.015     -1.49917   -.1613501
          i13 |  -.0230189   .2767607    -0.08   0.934    -.5654599     .519422
          i14 |  -.6990455   .4427716    -1.58   0.114    -1.566862     .168771
          i15 |   .9552122   .5029797     1.90   0.058    -.0306098    1.941034
          i16 |   1.229863   .3165842     3.88   0.000     .6093695    1.850357
          i17 |   2.320686   .2227914    10.42   0.000     1.884023    2.757349
          i18 |  -.4873996   .2006692    -2.43   0.015    -.8807041   -.0940951
          i19 |  -1.733886   .4779582    -3.63   0.000    -2.670667    -.797105
          i20 |   .1462459   .4612348     0.32   0.751    -.7577576     1.05025
          i21 |  -1.042998   .7062474    -1.48   0.140    -2.427218    .3412212
          i22 |  -.2609352   .2767126    -0.94   0.346     -.803282    .2814116
          i23 |   .7064341   .2752837     2.57   0.010      .166888     1.24598
          i24 |   .9639486   .4975603     1.94   0.053    -.0112516    1.939149
          i25 |  -.0313239    .257113    -0.12   0.903    -.5352561    .4726083
          i26 |  -1.372753   .3025373    -4.54   0.000    -1.965715   -.7797904
          i27 |   1.718741   .2685383     6.40   0.000     1.192416    2.245066
          i28 |   1.013695   .2046948     4.95   0.000     .6125001    1.414889
          i29 |  -.7529625    .259343    -2.90   0.004    -1.261265   -.2446596
          i30 |  -.8606042   .2141064    -4.02   0.000    -1.280245   -.4409633
          i31 |  -.8170542   .2447292    -3.34   0.001    -1.296715   -.3373938
          i32 |  -.8246309   .3242266    -2.54   0.011    -1.460103   -.1891585
          i33 |    1.19006   .3063364     3.88   0.000     .5896515    1.790468
          i34 |   .8337664   .2285556     3.65   0.000     .3858057    1.281727
          i35 |   2.603487   .2680282     9.71   0.000     2.078162    3.128813
          i36 |    .743407   .2776682     2.68   0.007     .1991873    1.287627
          i37 |  -.1578263   .2249213    -0.70   0.483     -.598664    .2830115
          i38 |  -.1646007   .3101611    -0.53   0.596    -.7725053     .443304
          i39 |  -.7576992   .2182753    -3.47   0.001    -1.185511   -.3298874
          i40 |   .6603936   .3315151     1.99   0.046     .0106359    1.310151
          i41 |  -.5967182   .3046021    -1.96   0.050    -1.193727     .000291
          i42 |    -1.2134   .4085579    -2.97   0.003    -2.014159   -.4126416
          i43 |  -1.124691    .285451    -3.94   0.000    -1.684164    -.565217
          i44 |   2.038209   .3572262     5.71   0.000     1.338058    2.738359
          i45 |   1.658945   .2982807     5.56   0.000     1.074325    2.243564
          i46 |  -.1435617   .6092505    -0.24   0.814    -1.337671    1.050547
          i47 |   2.519641    .325937     7.73   0.000     1.880816    3.158466
          i48 |  -.5085662   .2219991    -2.29   0.022    -.9436764   -.0734559
          i49 |  -1.667624   .3143147    -5.31   0.000    -2.283669   -1.051578
          i50 |  -.0777788   .3667264    -0.21   0.832    -.7965494    .6409917
          i51 |  -.3577828   .3310628    -1.08   0.280    -1.006654    .2910884
          i52 |  -.5109901   .2892462    -1.77   0.077    -1.077902    .0559221
          i53 |   -1.05527   .2119931    -4.98   0.000    -1.470769   -.6397713
          i54 |   2.889512    .196869    14.68   0.000     2.503655    3.275368
          i55 |   -1.98194   .2589271    -7.65   0.000    -2.489428   -1.474452
          i56 |   .9075162   .2472556     3.67   0.000     .4229041    1.392128
          i57 |  -1.168575    .340234    -3.43   0.001    -1.835421   -.5017284
          i58 |   .2671566   .3677427     0.73   0.468    -.4536059    .9879191
          i59 |  -1.096503   .2495469    -4.39   0.000    -1.585606   -.6073999
          i60 |  -1.094906   .3646617    -3.00   0.003     -1.80963   -.3801825
          i61 |  -.3624393   .3148613    -1.15   0.250    -.9795561    .2546775
          i62 |   .6131669   .2635908     2.33   0.020     .0965385    1.129795
          i63 |   1.069192   .2760403     3.87   0.000     .5281629    1.610221
          i64 |   -1.31464   .2539351    -5.18   0.000    -1.812343    -.816936
          i65 |  -.6529052   .5421521    -1.20   0.228    -1.715504    .4096933
          i66 |  -.6975897   .2581147    -2.70   0.007    -1.203485   -.1916941
          i67 |  -.8209193   .2339036    -3.51   0.000    -1.279362   -.3624767
          i68 |   .4400293   .3028565     1.45   0.146    -.1535584    1.033617
          i69 |   .9932662   .2739265     3.63   0.000     .4563802    1.530152
          i70 |   .7854338   .2412855     3.26   0.001     .3125228    1.258345
          i71 |   .8206437   .2631995     3.12   0.002     .3047821    1.336505
          i72 |    .022107   .3084093     0.07   0.943    -.5823641     .626578
          i73 |  -1.600165   .2992454    -5.35   0.000    -2.186675   -1.013654
          i74 |  -1.137089   .7345305    -1.55   0.122    -2.576742    .3025645
          i75 |  -.8102243   .1910345    -4.24   0.000    -1.184645   -.4358036
          i76 |    1.16119   .4166758     2.79   0.005     .3445207     1.97786
          i77 |  -.3264091   .4122016    -0.79   0.428    -1.134309    .4814911
          i78 |  -.9454922   .2762856    -3.42   0.001    -1.487002   -.4039824
          i79 |   -.561772   .3619647    -1.55   0.121     -1.27121    .1476659
          i80 |   .8787515    .266605     3.30   0.001     .3562152    1.401288
          i81 |  -1.109053   .3061366    -3.62   0.000    -1.709069   -.5090359
          i82 |  -.5866019   .6192501    -0.95   0.343     -1.80031     .627106
          i83 |   1.293601    .196182     6.59   0.000     .9090911     1.67811
          i84 |   .6554216   .4452092     1.47   0.141    -.2171724    1.528016
          i85 |    1.20543   .2064409     5.84   0.000     .8008137    1.610047
          i87 |    .980969   .2404438     4.08   0.000     .5097077     1.45223
          i88 |   -.894318    .257461    -3.47   0.001    -1.398932   -.3897037
           x1 |  -.0241537   .1422342    -0.17   0.865    -.3029277    .2546202
           x2 |   .0307988   .1297774     0.24   0.812    -.2235601    .2851578
           x3 |   .0643942   .1241439     0.52   0.604    -.1789233    .3077118
           x4 |  -.0173594   .1263254    -0.14   0.891    -.2649526    .2302339
           x5 |  -.0531788   .1088802    -0.49   0.625      -.26658    .1602224
           x6 |     .00553   .0997463     0.06   0.956    -.1899692    .2010293
           x7 |   .0270326   .0964873     0.28   0.779     -.162079    .2161441
           x8 |   .0442563   .0845386     0.52   0.601    -.1214364     .209949
           x9 |   .0665754   .0798621     0.83   0.404    -.0899515    .2231023
          x10 |   .0606778   .0728971     0.83   0.405     -.082198    .2035535
          x11 |   .0559688   .0766128     0.73   0.465    -.0941896    .2061272
          x12 |   .1102259   .0687467     1.60   0.109    -.0245152     .244967
          x13 |   .0895588   .0670219     1.34   0.181    -.0418018    .2209194
          x14 |   .0861635   .0657106     1.31   0.190    -.0426269    .2149539
          x15 |    .100966    .055862     1.81   0.071    -.0085214    .2104534
          x16 |   .0361056   .0559295     0.65   0.519    -.0735142    .1457255
          x17 |   .0640153   .0417948     1.53   0.126     -.017901    .1459315
          x18 |   .0526044   .0372259     1.41   0.158    -.0203571    .1255659
          x19 |    .004535    .026802     0.17   0.866    -.0479959    .0570659
        _cons |   4.628476   1.681171     2.75   0.006     1.333441    7.923511
--------------+----------------------------------------------------------------
var(e.infan~t)|   225.5727   45.74222                      151.5925    335.6568
var(e.lrhom~n)|   .3281681    .071972                      .2135087    .5044025
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv'->`iv2' nationXyear)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #6
. //      Mediation model Infant mort -> Frasher to `dv' nation fixed effects
. sem ( `iv2' -> `iv', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv
> ')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: fraser lrhom_un

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:  Log pseudolikelihood =  124188.59  
Iteration 1:  Log pseudolikelihood =  124188.59  

Structural equation model                                Number of obs = 1,949
Estimation method: ml

Log pseudolikelihood = 124188.59

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  fraser      |
   infantmort |  -.0278327   .0037923    -7.34   0.000    -.0352654      -.0204
        _cons |   7.548916   .0845517    89.28   0.000     7.383197    7.714634
  ------------+----------------------------------------------------------------
  lrhom_un    |
       fraser |  -.3144694   .1246938    -2.52   0.012    -.5588648    -.070074
   infantmort |   .0124055   .0162491     0.76   0.445    -.0194422    .0442531
          edu |  -1.820196   1.281763    -1.42   0.156    -4.332405     .692013
        unemp |   .0051139   .0235748     0.22   0.828    -.0410919    .0513196
     popdense |  -.0002844   .0000467    -6.09   0.000     -.000376   -.0001928
     perurban |   .0192599   .0089811     2.14   0.032     .0016572    .0368625
     sexratio |  -.0128423   .0019432    -6.61   0.000    -.0166509   -.0090337
           i1 |   .4015731   .2470274     1.63   0.104    -.0825918     .885738
           i2 |  -2.108874   .3208618    -6.57   0.000    -2.737751   -1.479996
           i3 |  -.7692935   .2509992    -3.06   0.002    -1.261243    -.277344
           i4 |  -.1515877   .3800438    -0.40   0.690    -.8964599    .5932845
           i5 |  -.4744637   .3684001    -1.29   0.198    -1.196515    .2475872
           i6 |  -.8767002   .2693087    -3.26   0.001    -1.404536   -.3488649
           i7 |   1.560329   .2611007     5.98   0.000     1.048581    2.072076
           i8 |  -.9721625   .1656409    -5.87   0.000    -1.296813   -.6475123
           i9 |  -.4218908    .344495    -1.22   0.221    -1.097089     .253307
          i10 |  -.2560012   .2898289    -0.88   0.377    -.8240554    .3120531
          i11 |    1.64541   .3386072     4.86   0.000     .9817517    2.309067
          i12 |  -.8158898   .3141721    -2.60   0.009    -1.431656   -.2001238
          i13 |  -.0274911   .2683987    -0.10   0.918    -.5535429    .4985606
          i14 |  -.6876444   .4390602    -1.57   0.117    -1.548186    .1728978
          i15 |   .9436884    .496634     1.90   0.057    -.0296964    1.917073
          i16 |   1.250027   .3066507     4.08   0.000     .6490026    1.851051
          i17 |   2.317829   .2229083    10.40   0.000     1.880937    2.754722
          i18 |  -.4901092   .2005096    -2.44   0.015    -.8831008   -.0971176
          i19 |   -1.71009   .4587521    -3.73   0.000    -2.609227   -.8109519
          i20 |   .1884057   .4426974     0.43   0.670    -.6792652    1.056077
          i21 |  -1.016348   .6894647    -1.47   0.140    -2.367674    .3349776
          i22 |  -.2739253   .2669015    -1.03   0.305    -.7970427    .2491921
          i23 |   .7317865   .2365078     3.09   0.002     .2682398    1.195333
          i24 |   .9490651   .4856848     1.95   0.051    -.0028595     1.90099
          i25 |  -.0189087    .260483    -0.07   0.942     -.529446    .4916286
          i26 |  -1.361541   .3013478    -4.52   0.000    -1.952172   -.7709101
          i27 |    1.73778   .2573252     6.75   0.000     1.233432    2.242128
          i28 |   1.022379   .2046762     5.00   0.000     .6212213    1.423537
          i29 |  -.7638324   .2505296    -3.05   0.002    -1.254861   -.2728033
          i30 |  -.8650289   .2090807    -4.14   0.000     -1.27482   -.4552383
          i31 |  -.8286282   .2270617    -3.65   0.000    -1.273661   -.3835955
          i32 |   -.832229   .3122762    -2.67   0.008    -1.444279   -.2201789
          i33 |   1.204002   .2959792     4.07   0.000     .6238937    1.784111
          i34 |   .8515608   .2293703     3.71   0.000     .4020033    1.301118
          i35 |   2.625607   .2500856    10.50   0.000     2.135448    3.115765
          i36 |   .7367747   .2619558     2.81   0.005     .2233509    1.250199
          i37 |  -.1623961   .2175964    -0.75   0.455    -.5888773    .2640851
          i38 |  -.1825401   .2932898    -0.62   0.534    -.7573777    .3922974
          i39 |  -.7605687   .2173571    -3.50   0.000    -1.186581   -.3345566
          i40 |    .625973   .3175285     1.97   0.049     .0036287    1.248317
          i41 |  -.6196651   .2773515    -2.23   0.025    -1.163264   -.0760661
          i42 |   -1.19644   .3884841    -3.08   0.002    -1.957855   -.4350251
          i43 |  -1.125135   .2820387    -3.99   0.000    -1.677921   -.5723493
          i44 |   2.064117   .3291839     6.27   0.000     1.418929    2.709306
          i45 |   1.651292   .2993263     5.52   0.000     1.064623    2.237961
          i46 |  -.0963481    .560517    -0.17   0.864    -1.194941    1.002245
          i47 |   2.544556   .3035759     8.38   0.000     1.949559    3.139554
          i48 |  -.5185942   .2114471    -2.45   0.014    -.9330229   -.1041654
          i49 |  -1.668933   .3086393    -5.41   0.000    -2.273855   -1.064011
          i50 |  -.0722079   .3591088    -0.20   0.841    -.7760483    .6316325
          i51 |  -.3863319   .2979393    -1.30   0.195    -.9702823    .1976185
          i52 |  -.5186044    .285643    -1.82   0.069    -1.078454    .0412456
          i53 |  -1.053282   .2094457    -5.03   0.000    -1.463788   -.6427762
          i54 |   2.888059   .1973935    14.63   0.000     2.501175    3.274943
          i55 |  -1.982489   .2582546    -7.68   0.000    -2.488659   -1.476319
          i56 |   .9231316   .2417861     3.82   0.000     .4492395    1.397024
          i57 |    -1.1377   .3257507    -3.49   0.000    -1.776159   -.4992399
          i58 |   .2724075   .3626895     0.75   0.453    -.4384508    .9832657
          i59 |  -1.107186   .2373405    -4.66   0.000    -1.572365   -.6420076
          i60 |  -1.073939   .3564768    -3.01   0.003    -1.772621   -.3752576
          i61 |  -.3177425   .2875243    -1.11   0.269    -.8812798    .2457948
          i62 |   .6037784    .256167     2.36   0.018     .1017004    1.105856
          i63 |   1.053635   .2582856     4.08   0.000     .5474048    1.559866
          i64 |  -1.312971   .2561353    -5.13   0.000    -1.814987   -.8109554
          i65 |  -.6498015    .540281    -1.20   0.229    -1.708733    .4091298
          i66 |  -.6894979   .2577742    -2.67   0.007    -1.194726   -.1842698
          i67 |  -.8101326   .2360013    -3.43   0.001    -1.272687   -.3475786
          i68 |   .4383933   .3041651     1.44   0.149    -.1577593    1.034546
          i69 |   1.011095    .265963     3.80   0.000     .4898166    1.532372
          i70 |   .7903303   .2397907     3.30   0.001     .3203492    1.260311
          i71 |    .823009   .2635051     3.12   0.002     .3065485    1.339469
          i72 |      .0276   .3060875     0.09   0.928    -.5723206    .6275206
          i73 |  -1.571509   .2583278    -6.08   0.000    -2.077822   -1.065196
          i74 |  -1.119205   .7068971    -1.58   0.113    -2.504698    .2662878
          i75 |  -.8024513   .1890785    -4.24   0.000    -1.173038   -.4318642
          i76 |     1.1608   .4058404     2.86   0.004     .3653672    1.956232
          i77 |  -.3159269   .4053357    -0.78   0.436     -1.11037    .4785165
          i78 |   -.958598   .2639393    -3.63   0.000     -1.47591   -.4412864
          i79 |   -.581785   .3452646    -1.69   0.092    -1.258491    .0949212
          i80 |   .8994126   .2471835     3.64   0.000     .4149418    1.383883
          i81 |  -1.126595   .2816463    -4.00   0.000    -1.678612   -.5745784
          i82 |  -.5614532   .5829109    -0.96   0.335    -1.703938    .5810311
          i83 |   1.296008   .1960854     6.61   0.000     .9116876    1.680328
          i84 |    .663309    .441067     1.50   0.133    -.2011665    1.527785
          i85 |   1.214905   .1998946     6.08   0.000     .8231189    1.606691
          i87 |   .9856428   .2421305     4.07   0.000     .5110758     1.46021
          i88 |  -.9012182   .2399598    -3.76   0.000    -1.371531   -.4309057
        _cons |   4.566691   1.650358     2.77   0.006     1.332048    7.801333
--------------+----------------------------------------------------------------
 var(e.fraser)|   .5501479   .1072339                      .3754609    .8061099
var(e.lrhom~n)|    .329789   .0716313                      .2154528    .5048009
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv2'->`iv')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #7
. //      Mediation model Infant mort -> Faser to `dv' nation and year fixed eff
> ects
. sem ( `iv2'-> `iv', ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' `iyear
> ' ->`dv')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: fraser lrhom_un

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88 x1
            x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19

Fitting target model:
Iteration 0:  Log pseudolikelihood =  130634.41  
Iteration 1:  Log pseudolikelihood =  130634.41  

Structural equation model                                Number of obs = 1,949
Estimation method: ml

Log pseudolikelihood = 130634.41

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  fraser      |
   infantmort |  -.0278327   .0037923    -7.34   0.000    -.0352654      -.0204
        _cons |   7.548916   .0845517    89.28   0.000     7.383197    7.714634
  ------------+----------------------------------------------------------------
  lrhom_un    |
       fraser |  -.3157791    .123139    -2.56   0.010    -.5571271   -.0744312
   infantmort |   .0122073   .0162925     0.75   0.454    -.0197253      .04414
          edu |  -1.965392   1.435257    -1.37   0.171    -4.778443    .8476594
        unemp |   .0048577   .0241135     0.20   0.840    -.0424039    .0521193
     popdense |  -.0002859   .0000463    -6.18   0.000    -.0003766   -.0001953
     perurban |   .0198165   .0092208     2.15   0.032      .001744     .037889
     sexratio |  -.0130745   .0020133    -6.49   0.000    -.0170206   -.0091285
           i1 |    .409163   .2495635     1.64   0.101    -.0799725    .8982984
           i2 |  -2.136319   .3298169    -6.48   0.000    -2.782748   -1.489889
           i3 |   -.783843   .2503141    -3.13   0.002     -1.27445   -.2932364
           i4 |  -.1557173    .376976    -0.41   0.680    -.8945766     .583142
           i5 |  -.4454871   .3986054    -1.12   0.264    -1.226739    .3357651
           i6 |  -.8593999   .2888693    -2.98   0.003    -1.425573   -.2932264
           i7 |   1.554077   .2604854     5.97   0.000     1.043535    2.064619
           i8 |    -.98902     .16549    -5.98   0.000    -1.313374   -.6646656
           i9 |  -.4380389   .3585783    -1.22   0.222    -1.140839    .2647617
          i10 |  -.2566098   .2923192    -0.88   0.380    -.8295449    .3163253
          i11 |    1.66963   .3554922     4.70   0.000     .9728778    2.366381
          i12 |  -.8302602   .3412869    -2.43   0.015     -1.49917   -.1613501
          i13 |  -.0230189   .2767607    -0.08   0.934    -.5654599     .519422
          i14 |  -.6990455   .4427716    -1.58   0.114    -1.566862     .168771
          i15 |   .9552122   .5029797     1.90   0.058    -.0306098    1.941034
          i16 |   1.229863   .3165842     3.88   0.000     .6093695    1.850357
          i17 |   2.320686   .2227914    10.42   0.000     1.884023    2.757349
          i18 |  -.4873996   .2006692    -2.43   0.015    -.8807041   -.0940951
          i19 |  -1.733886   .4779582    -3.63   0.000    -2.670667    -.797105
          i20 |   .1462459   .4612348     0.32   0.751    -.7577576     1.05025
          i21 |  -1.042998   .7062474    -1.48   0.140    -2.427218    .3412212
          i22 |  -.2609352   .2767126    -0.94   0.346     -.803282    .2814116
          i23 |   .7064341   .2752837     2.57   0.010      .166888     1.24598
          i24 |   .9639486   .4975603     1.94   0.053    -.0112516    1.939149
          i25 |  -.0313239    .257113    -0.12   0.903    -.5352561    .4726083
          i26 |  -1.372753   .3025373    -4.54   0.000    -1.965715   -.7797904
          i27 |   1.718741   .2685383     6.40   0.000     1.192416    2.245066
          i28 |   1.013695   .2046948     4.95   0.000     .6125001    1.414889
          i29 |  -.7529625    .259343    -2.90   0.004    -1.261265   -.2446596
          i30 |  -.8606042   .2141064    -4.02   0.000    -1.280245   -.4409633
          i31 |  -.8170542   .2447292    -3.34   0.001    -1.296715   -.3373938
          i32 |  -.8246309   .3242266    -2.54   0.011    -1.460103   -.1891585
          i33 |    1.19006   .3063364     3.88   0.000     .5896515    1.790468
          i34 |   .8337664   .2285556     3.65   0.000     .3858057    1.281727
          i35 |   2.603487   .2680282     9.71   0.000     2.078162    3.128813
          i36 |    .743407   .2776682     2.68   0.007     .1991873    1.287627
          i37 |  -.1578263   .2249213    -0.70   0.483     -.598664    .2830115
          i38 |  -.1646007   .3101611    -0.53   0.596    -.7725053     .443304
          i39 |  -.7576992   .2182753    -3.47   0.001    -1.185511   -.3298874
          i40 |   .6603936   .3315151     1.99   0.046     .0106359    1.310151
          i41 |  -.5967182   .3046021    -1.96   0.050    -1.193727     .000291
          i42 |    -1.2134   .4085579    -2.97   0.003    -2.014159   -.4126416
          i43 |  -1.124691    .285451    -3.94   0.000    -1.684164    -.565217
          i44 |   2.038209   .3572262     5.71   0.000     1.338058    2.738359
          i45 |   1.658945   .2982807     5.56   0.000     1.074325    2.243564
          i46 |  -.1435617   .6092505    -0.24   0.814    -1.337671    1.050547
          i47 |   2.519641    .325937     7.73   0.000     1.880816    3.158466
          i48 |  -.5085662   .2219991    -2.29   0.022    -.9436764   -.0734559
          i49 |  -1.667624   .3143147    -5.31   0.000    -2.283669   -1.051578
          i50 |  -.0777788   .3667264    -0.21   0.832    -.7965494    .6409917
          i51 |  -.3577828   .3310628    -1.08   0.280    -1.006654    .2910884
          i52 |  -.5109901   .2892462    -1.77   0.077    -1.077902    .0559221
          i53 |   -1.05527   .2119931    -4.98   0.000    -1.470769   -.6397713
          i54 |   2.889512    .196869    14.68   0.000     2.503655    3.275368
          i55 |   -1.98194   .2589271    -7.65   0.000    -2.489428   -1.474452
          i56 |   .9075162   .2472556     3.67   0.000     .4229041    1.392128
          i57 |  -1.168575    .340234    -3.43   0.001    -1.835421   -.5017284
          i58 |   .2671566   .3677427     0.73   0.468    -.4536059    .9879191
          i59 |  -1.096503   .2495469    -4.39   0.000    -1.585606   -.6073999
          i60 |  -1.094906   .3646617    -3.00   0.003     -1.80963   -.3801825
          i61 |  -.3624393   .3148613    -1.15   0.250    -.9795561    .2546775
          i62 |   .6131669   .2635908     2.33   0.020     .0965385    1.129795
          i63 |   1.069192   .2760403     3.87   0.000     .5281629    1.610221
          i64 |   -1.31464   .2539351    -5.18   0.000    -1.812343    -.816936
          i65 |  -.6529052   .5421521    -1.20   0.228    -1.715504    .4096933
          i66 |  -.6975897   .2581147    -2.70   0.007    -1.203485   -.1916941
          i67 |  -.8209193   .2339036    -3.51   0.000    -1.279362   -.3624767
          i68 |   .4400293   .3028565     1.45   0.146    -.1535584    1.033617
          i69 |   .9932662   .2739265     3.63   0.000     .4563802    1.530152
          i70 |   .7854338   .2412855     3.26   0.001     .3125228    1.258345
          i71 |   .8206437   .2631995     3.12   0.002     .3047821    1.336505
          i72 |    .022107   .3084093     0.07   0.943    -.5823641     .626578
          i73 |  -1.600165   .2992454    -5.35   0.000    -2.186675   -1.013654
          i74 |  -1.137089   .7345305    -1.55   0.122    -2.576742    .3025645
          i75 |  -.8102243   .1910345    -4.24   0.000    -1.184645   -.4358036
          i76 |    1.16119   .4166758     2.79   0.005     .3445207     1.97786
          i77 |  -.3264091   .4122016    -0.79   0.428    -1.134309    .4814911
          i78 |  -.9454922   .2762856    -3.42   0.001    -1.487002   -.4039824
          i79 |   -.561772   .3619647    -1.55   0.121     -1.27121    .1476659
          i80 |   .8787515    .266605     3.30   0.001     .3562152    1.401288
          i81 |  -1.109053   .3061366    -3.62   0.000    -1.709069   -.5090359
          i82 |  -.5866019   .6192501    -0.95   0.343     -1.80031     .627106
          i83 |   1.293601    .196182     6.59   0.000     .9090911     1.67811
          i84 |   .6554216   .4452092     1.47   0.141    -.2171724    1.528016
          i85 |    1.20543   .2064409     5.84   0.000     .8008137    1.610047
          i87 |    .980969   .2404438     4.08   0.000     .5097077     1.45223
          i88 |   -.894318    .257461    -3.47   0.001    -1.398932   -.3897037
           x1 |  -.0241537   .1422342    -0.17   0.865    -.3029277    .2546202
           x2 |   .0307988   .1297774     0.24   0.812    -.2235601    .2851578
           x3 |   .0643942   .1241439     0.52   0.604    -.1789233    .3077118
           x4 |  -.0173594   .1263254    -0.14   0.891    -.2649526    .2302339
           x5 |  -.0531788   .1088802    -0.49   0.625      -.26658    .1602224
           x6 |     .00553   .0997463     0.06   0.956    -.1899692    .2010293
           x7 |   .0270326   .0964873     0.28   0.779     -.162079    .2161441
           x8 |   .0442563   .0845386     0.52   0.601    -.1214364     .209949
           x9 |   .0665754   .0798621     0.83   0.404    -.0899515    .2231023
          x10 |   .0606778   .0728971     0.83   0.405     -.082198    .2035535
          x11 |   .0559688   .0766128     0.73   0.465    -.0941896    .2061272
          x12 |   .1102259   .0687467     1.60   0.109    -.0245152     .244967
          x13 |   .0895588   .0670219     1.34   0.181    -.0418018    .2209194
          x14 |   .0861635   .0657106     1.31   0.190    -.0426269    .2149539
          x15 |    .100966    .055862     1.81   0.071    -.0085214    .2104534
          x16 |   .0361056   .0559295     0.65   0.519    -.0735142    .1457255
          x17 |   .0640153   .0417948     1.53   0.126     -.017901    .1459315
          x18 |   .0526044   .0372259     1.41   0.158    -.0203571    .1255659
          x19 |    .004535    .026802     0.17   0.866    -.0479959    .0570659
        _cons |   4.628476   1.681171     2.75   0.006     1.333441    7.923511
--------------+----------------------------------------------------------------
 var(e.fraser)|   .5501479   .1072339                      .3754609    .8061099
var(e.lrhom~n)|   .3281681    .071972                      .2135087    .5044025
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv2'->`iv' nationXyear)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #8
. //      Mediation model for hertiage -> infant 
. sem ( heritage-> `iv2', ) (heritage `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid
> ' ->`dv')  ,  vce(cluster CID) nocapslatent
(71 observations with missing values excluded)

Endogenous variables
  Observed: infantmort lrhom_un

Exogenous variables
  Observed: heritage edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:  Log pseudolikelihood =  111771.37  
Iteration 1:  Log pseudolikelihood =  111771.37  (not concave)
Iteration 2:  Log pseudolikelihood =  111771.37  (not concave)
Iteration 3:  Log pseudolikelihood =  111771.37  (not concave)
Iteration 4:  Log pseudolikelihood =  111771.37  (backed up)

Structural equation model                                Number of obs = 1,878
Estimation method: ml

Log pseudolikelihood = 111771.37

                                   (Std. err. adjusted for 120 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
     heritage |  -.9939195   .1541658    -6.45   0.000    -1.296079   -.6917601
        _cons |   80.43187   10.81198     7.44   0.000     59.24077     101.623
  ------------+----------------------------------------------------------------
  lrhom_un    |
   infantmort |   .0102656   .0168493     0.61   0.542    -.0227584    .0432896
     heritage |  -.0228481   .0134356    -1.70   0.089    -.0491814    .0034853
          edu |  -2.702937   1.331641    -2.03   0.042    -5.312905   -.0929687
        unemp |   .0125608   .0320377     0.39   0.695    -.0502319    .0753535
     popdense |  -.0002936     .00005    -5.87   0.000    -.0003917   -.0001956
     perurban |   .0230097   .0103134     2.23   0.026     .0027959    .0432235
     sexratio |  -.0126206    .002152    -5.86   0.000    -.0168385   -.0084028
           i1 |   .2252997   .3291566     0.68   0.494    -.4198354    .8704348
           i2 |  -1.859375   .3078703    -6.04   0.000     -2.46279    -1.25596
           i3 |  -.5145076   .2559489    -2.01   0.044    -1.016158   -.0128569
           i4 |   -.082912   .4260403    -0.19   0.846    -.9179357    .7521118
           i5 |  -.3016757   .3963034    -0.76   0.447    -1.078416    .4750647
           i6 |  -.8881436   .2912106    -3.05   0.002    -1.458906   -.3173813
           i7 |   1.544702   .2843476     5.43   0.000     .9873909    2.102013
           i8 |  -.8843923   .1769972    -5.00   0.000      -1.2313   -.5374842
           i9 |  -.4240536   .3532637    -1.20   0.230    -1.116438    .2683306
          i10 |  -.3899129   .3758045    -1.04   0.299    -1.126476    .3466504
          i11 |   2.053611   .4369126     4.70   0.000     1.197278    2.909944
          i12 |  -.8628483   .3165251    -2.73   0.006    -1.483226   -.2424705
          i13 |  -.2054193   .3869987    -0.53   0.596    -.9639229    .5530842
          i14 |  -.8746335    .622991    -1.40   0.160    -2.095673    .3464064
          i15 |   .9885322   .5949108     1.66   0.097    -.1774715    2.154536
          i16 |   1.167293   .3537183     3.30   0.001     .4740184    1.860569
          i17 |   2.406384   .2514284     9.57   0.000     1.913593    2.899174
          i18 |  -.6357203   .2307029    -2.76   0.006     -1.08789   -.1835509
          i19 |          0  (constrained)
          i20 |   .3082676   .4587471     0.67   0.502    -.5908601    1.207395
          i21 |  -.8774686   .7281079    -1.21   0.228    -2.304534    .5495968
          i22 |  -.2722735   .2897607    -0.94   0.347     -.840194    .2956471
          i23 |   .7978421   .2528741     3.16   0.002     .3022181    1.293466
          i24 |    1.19026   .4949484     2.40   0.016     .2201789    2.160341
          i25 |  -.0484676   .2831852    -0.17   0.864    -.6035005    .5065652
          i26 |  -1.314648   .2956017    -4.45   0.000    -1.894016    -.735279
          i27 |    1.77267   .2807966     6.31   0.000     1.222319    2.323021
          i28 |   .8462426   .2303607     3.67   0.000      .394744    1.297741
          i29 |  -.8678766   .2966202    -2.93   0.003    -1.449242   -.2865116
          i30 |  -.8665382   .2457257    -3.53   0.000    -1.348152   -.3849247
          i31 |  -.8233379    .239535    -3.44   0.001    -1.292818    -.353858
          i32 |  -.8232084   .3149955    -2.61   0.009    -1.440588   -.2058286
          i33 |   1.028219   .3209952     3.20   0.001     .3990801    1.657358
          i34 |   .7995533   .2841801     2.81   0.005     .2425705    1.356536
          i35 |   2.474167   .2630865     9.40   0.000     1.958527    2.989807
          i36 |   .8156019   .3204171     2.55   0.011      .187596    1.443608
          i37 |  -.1387086   .2209261    -0.63   0.530    -.5717158    .2942986
          i38 |  -.1995506   .3012507    -0.66   0.508     -.789991    .3908898
          i39 |  -1.010659   .2518535    -4.01   0.000    -1.504283   -.5170353
          i40 |   .5527596   .3913674     1.41   0.158    -.2143064    1.319826
          i41 |  -.5987186   .2812393    -2.13   0.033    -1.149937   -.0474997
          i42 |  -1.219747   .4000315    -3.05   0.002    -2.003795   -.4357001
          i43 |  -1.341672   .3616658    -3.71   0.000    -2.050524   -.6328205
          i44 |   1.769268    .322962     5.48   0.000     1.136275    2.402262
          i45 |   1.652001   .3580724     4.61   0.000     .9501915     2.35381
          i46 |  -.4176192    .599626    -0.70   0.486    -1.592865    .7576262
          i47 |   2.250054   .3194299     7.04   0.000     1.623983    2.876125
          i48 |  -.5583922   .2217603    -2.52   0.012    -.9930344   -.1237499
          i49 |  -1.552894   .3263211    -4.76   0.000    -2.192471   -.9133162
          i50 |  -.1065821   .3743602    -0.28   0.776    -.8403146    .6271503
          i51 |   -.238907   .3910257    -0.61   0.541    -1.005303    .5274893
          i52 |  -.5537526   .3014532    -1.84   0.066     -1.14459    .0370847
          i53 |  -1.275716   .2347657    -5.43   0.000    -1.735848   -.8155833
          i54 |   2.780021   .2391547    11.62   0.000     2.311286    3.248756
          i55 |  -2.099668   .2848061    -7.37   0.000    -2.657878   -1.541458
          i56 |   1.048803   .2485967     4.22   0.000     .5615627    1.536044
          i57 |  -1.341468   .3625225    -3.70   0.000    -2.051999   -.6309371
          i58 |   .1571261   .3624846     0.43   0.665    -.5533307     .867583
          i59 |  -1.044921   .2551615    -4.10   0.000    -1.545028   -.5448133
          i60 |  -1.209042   .4296127    -2.81   0.005    -2.051067   -.3670165
          i61 |   -.684299   .3931411    -1.74   0.082    -1.454841    .0862433
          i62 |   .4956068   .2797911     1.77   0.077    -.0527736    1.043987
          i63 |   1.087585   .3013301     3.61   0.000     .4969892    1.678182
          i64 |  -1.312677   .2858726    -4.59   0.000    -1.872977   -.7523775
          i65 |  -.3823431   .5926697    -0.65   0.519    -1.543954    .7792682
          i66 |  -.5973134   .2730767    -2.19   0.029    -1.132534   -.0620928
          i67 |   -1.02854   .2945529    -3.49   0.000    -1.605853   -.4512268
          i68 |   .4743051    .389325     1.22   0.223    -.2887578    1.237368
          i69 |   .9824653   .2942353     3.34   0.001     .4057748    1.559156
          i70 |   .6605376   .2505393     2.64   0.008     .1694895    1.151586
          i71 |   .8204794   .2577408     3.18   0.001     .3153168    1.325642
          i72 |   -.068956   .4078467    -0.17   0.866    -.8683208    .7304089
          i73 |   -1.64235   .2792971    -5.88   0.000    -2.189763   -1.094938
          i74 |  -.8783748   .7469481    -1.18   0.240    -2.342366    .5856166
          i75 |  -.8271843   .2069367    -4.00   0.000    -1.232773   -.4215958
          i76 |   1.164106   .5545824     2.10   0.036     .0771449    2.251068
          i77 |  -.4175133   .4026351    -1.04   0.300    -1.206664    .3716369
          i78 |  -.9186576   .2759238    -3.33   0.001    -1.459458   -.3778569
          i79 |  -.5107636   .3683369    -1.39   0.166    -1.232691    .2111635
          i80 |   .6272835   .2621325     2.39   0.017     .1135133    1.141054
          i81 |  -1.095607   .2897888    -3.78   0.000    -1.663582   -.5276311
          i82 |  -.4527195   .6098273    -0.74   0.458    -1.647959      .74252
          i83 |   1.118567   .1963367     5.70   0.000     .7337539     1.50338
          i84 |   .6709221   .4523451     1.48   0.138    -.2156579    1.557502
          i85 |   1.091455   .2109593     5.17   0.000     .6779827    1.504928
          i87 |    1.04018   .2731352     3.81   0.000     .5048452    1.575515
          i88 |   -.762079   .2636368    -2.89   0.004    -1.278798   -.2453603
        _cons |   4.150572   1.587739     2.61   0.009      1.03866    7.262484
--------------+----------------------------------------------------------------
var(e.infan~t)|   234.6432   47.77633                      157.4318    349.7223
var(e.lrhom~n)|   .3403944   .0771324                      .2183245    .5307162
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(heritage->`iv2')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. /*
> //      #10
> //      Mediation model for heritage -> infant nation and year fixed effects
> sem ( heritage-> `iv2', ) (heritage `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid
> ' `iyear'->`dv')  ,  vce(cluster CID) nocapslatent
> outreg2 using `file', append `opt' 
> */
. 
. //      #11
. //      Mediation models for rol => infant 
. sem ( rol-> `iv2', ) (rol `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv') 
>  ,  vce(cluster CID) nocapslatent
(160 observations with missing values excluded)

Endogenous variables
  Observed: infantmort lrhom_un

Exogenous variables
  Observed: rol edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7 i8
            i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25
            i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41
            i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57
            i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73
            i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:  Log pseudolikelihood =  113865.66  
Iteration 1:  Log pseudolikelihood =  113865.66  

Structural equation model                                Number of obs = 1,789
Estimation method: ml

Log pseudolikelihood = 113865.66

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
          rol |   -10.9303   1.249977    -8.74   0.000    -13.38021   -8.480395
        _cons |   19.65522   1.428087    13.76   0.000     16.85622    22.45422
  ------------+----------------------------------------------------------------
  lrhom_un    |
   infantmort |   .0103766    .017664     0.59   0.557    -.0242443    .0449975
          rol |  -.6979283   .1229438    -5.68   0.000    -.9388937   -.4569628
          edu |   -.943187   1.365993    -0.69   0.490    -3.620485    1.734111
        unemp |  -.0006247   .0246389    -0.03   0.980    -.0489161    .0476667
     popdense |  -.0002536   .0000407    -6.24   0.000    -.0003333   -.0001739
     perurban |   .0220374   .0081108     2.72   0.007     .0061405    .0379343
     sexratio |  -.0116862   .0016501    -7.08   0.000    -.0149203   -.0084521
           i1 |  -.1829003   .2595086    -0.70   0.481    -.6915277    .3257271
           i2 |  -2.147406   .2317321    -9.27   0.000    -2.601593    -1.69322
           i3 |  -1.117033   .2591665    -4.31   0.000     -1.62499   -.6090764
           i4 |  -.5242672    .306436    -1.71   0.087    -1.124871    .0763363
           i5 |  -.1551632   .3379004    -0.46   0.646    -.8174358    .5071093
           i6 |  -.1448641   .2681197    -0.54   0.589    -.6703691    .3806408
           i7 |   1.865099   .2322908     8.03   0.000     1.409818    2.320381
           i8 |   -1.14247   .1385152    -8.25   0.000    -1.413955   -.8709852
           i9 |  -.5055737   .3178413    -1.59   0.112    -1.128531    .1173839
          i10 |  -.8505291   .2763688    -3.08   0.002    -1.392202   -.3088561
          i11 |   2.465026   .3334657     7.39   0.000     1.811445    3.118607
          i12 |  -.2474496   .2998798    -0.83   0.409    -.8352033     .340304
          i13 |  -.8013985   .2803951    -2.86   0.004    -1.350963   -.2518342
          i14 |  -.8021364   .4712893    -1.70   0.089    -1.725847    .1215737
          i15 |   1.437194   .5312887     2.71   0.007     .3958872    2.478501
          i16 |    1.16964   .2363977     4.95   0.000     .7063093    1.632971
          i17 |   2.187307   .2292338     9.54   0.000     1.738017    2.636597
          i18 |  -.9397758   .1704912    -5.51   0.000    -1.273932   -.6056191
          i19 |  -1.600514   .4011908    -3.99   0.000    -2.386834   -.8141947
          i20 |  -.0143268     .42525    -0.03   0.973    -.8478014    .8191478
          i21 |  -1.113388   .6905857    -1.61   0.107    -2.466911    .2401351
          i22 |   .2347566   .2435712     0.96   0.335    -.2426341    .7121473
          i23 |   .9880283   .2297638     4.30   0.000     .5376995    1.438357
          i24 |   .9958523   .4754069     2.09   0.036     .0640719    1.927633
          i25 |   .2179717   .2141417     1.02   0.309    -.2017383    .6376817
          i26 |  -1.435595    .287879    -4.99   0.000    -1.999828   -.8713627
          i27 |   1.437117   .2075234     6.93   0.000     1.030378    1.843855
          i28 |   1.075874   .1722586     6.25   0.000     .7382529    1.413494
          i29 |  -.8421109   .2505761    -3.36   0.001    -1.333231   -.3509907
          i30 |  -.5403709   .1884527    -2.87   0.004    -.9097315   -.1710103
          i31 |  -.7265799   .1879081    -3.87   0.000    -1.094873   -.3582868
          i32 |  -.2802508   .3048357    -0.92   0.358    -.8777179    .3172162
          i33 |    .727064   .2814928     2.58   0.010     .1753483     1.27878
          i34 |   .3050649    .232945     1.31   0.190    -.1514989    .7616288
          i35 |   1.954881    .250828     7.79   0.000     1.463267    2.446494
          i36 |   .8506519   .2196168     3.87   0.000     .4202108    1.281093
          i37 |  -.5531778   .2242375    -2.47   0.014    -.9926752   -.1136804
          i38 |   .4644033   .2909359     1.60   0.110    -.1058205    1.034627
          i39 |  -.2737862   .1989065    -1.38   0.169    -.6636357    .1160633
          i40 |    .131238   .3055109     0.43   0.668    -.4675523    .7300284
          i41 |  -.1638677   .2619245    -0.63   0.532    -.6772302    .3494948
          i42 |  -.9553005    .386389    -2.47   0.013    -1.712609   -.1979919
          i43 |  -1.049853   .2753494    -3.81   0.000    -1.589528   -.5101778
          i44 |   1.373442   .3143306     4.37   0.000     .7573651    1.989518
          i45 |   1.684517   .2986952     5.64   0.000     1.099085    2.269949
          i46 |  -.5867953   .5731019    -1.02   0.306    -1.710054    .5364637
          i47 |   1.913632    .321416     5.95   0.000     1.283668    2.543596
          i48 |  -.4732782   .1734263    -2.73   0.006    -.8131875   -.1333688
          i49 |  -1.121342   .2792268    -4.02   0.000    -1.668616   -.5740669
          i50 |   .2927411   .3327521     0.88   0.379     -.359441    .9449233
          i51 |   .0500121   .2721914     0.18   0.854    -.4834733    .5834975
          i52 |   -.409393   .2305526    -1.78   0.076    -.8612678    .0424818
          i53 |  -1.225876   .1825716    -6.71   0.000    -1.583709   -.8680417
          i54 |    2.46872   .1853666    13.32   0.000     2.105408    2.832032
          i55 |  -1.738016   .2197896    -7.91   0.000    -2.168796   -1.307236
          i56 |   .2413554   .2625405     0.92   0.358    -.2732145    .7559253
          i57 |  -1.230822   .2899967    -4.24   0.000    -1.799205   -.6624387
          i58 |  -.1033214   .3247697    -0.32   0.750    -.7398584    .5332155
          i59 |  -.9550664   .1931834    -4.94   0.000    -1.333699   -.5764338
          i60 |  -1.012782   .3088928    -3.28   0.001    -1.618201   -.4073632
          i61 |   -1.03656    .284963    -3.64   0.000    -1.595078    -.478043
          i62 |   .4966512   .2191666     2.27   0.023     .0670925    .9262099
          i63 |     1.0587    .222165     4.77   0.000     .6232648    1.494135
          i64 |   -.686262   .2487223    -2.76   0.006    -1.173749   -.1987752
          i65 |  -.0789883   .4905169    -0.16   0.872    -1.040384    .8824072
          i66 |  -.5499591   .2240308    -2.45   0.014    -.9890515   -.1108667
          i67 |  -.4531491   .1985192    -2.28   0.022    -.8422395   -.0640586
          i68 |   .6450796   .2598514     2.48   0.013     .1357803    1.154379
          i69 |   .5770695   .2295774     2.51   0.012     .1271061    1.027033
          i70 |     .38317   .2184925     1.75   0.079    -.0450674    .8114075
          i71 |    .490844   .2681003     1.83   0.067    -.0346231    1.016311
          i72 |  -.2698329   .3169014    -0.85   0.395    -.8909482    .3512824
          i73 |  -1.394699   .2185931    -6.38   0.000    -1.823133    -.966264
          i74 |  -.7288951   .7428982    -0.98   0.327    -2.184949    .7271587
          i75 |  -.6907949   .1622951    -4.26   0.000    -1.008887   -.3727024
          i76 |   1.605976   .4231733     3.80   0.000     .7765719    2.435381
          i77 |  -.4261901   .3731779    -1.14   0.253    -1.157605    .3052252
          i78 |    -.45462   .2487887    -1.83   0.068    -.9422369    .0329969
          i79 |  -.1807794   .3107903    -0.58   0.561    -.7899171    .4283583
          i80 |   .3436948    .247209     1.39   0.164     -.140826    .8282155
          i81 |  -.4649191   .2726741    -1.71   0.088    -.9993505    .0695124
          i82 |  -.4510757   .5802821    -0.78   0.437    -1.588408    .6862562
          i83 |   .9092752   .1495411     6.08   0.000     .6161801     1.20237
          i84 |   .6266572   .3995945     1.57   0.117    -.1565337    1.409848
          i85 |   .5443738   .2033031     2.68   0.007      .145907    .9428407
          i87 |    .569356   .2430337     2.34   0.019     .0930187    1.045693
          i88 |  -.7977471   .2201042    -3.62   0.000    -1.229143   -.3663509
        _cons |    1.68471   1.419644     1.19   0.235    -1.097741    4.467161
--------------+----------------------------------------------------------------
var(e.infan~t)|   206.5415   46.98759                      132.2396    322.5917
var(e.lrhom~n)|   .2835118   .0644225                      .1816152     .442578
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(rol->`iv2')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #12
. //      Mediation models for  infnat=> rol 
. sem ( `iv2'-> rol, ) ( `iv2' rol -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv')
>   ,  vce(cluster CID) nocapslatent
(160 observations with missing values excluded)

Endogenous variables
  Observed: rol lrhom_un

Exogenous variables
  Observed: infantmort edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6
            i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23
            i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39
            i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55
            i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71
            i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:  Log pseudolikelihood =  113984.13  
Iteration 1:  Log pseudolikelihood =  113984.13  

Structural equation model                                Number of obs = 1,789
Estimation method: ml

Log pseudolikelihood = 113984.13

                                   (Std. err. adjusted for 123 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  rol         |
   infantmort |  -.0316911    .004452    -7.12   0.000    -.0404168   -.0229654
        _cons |   .7784563   .1096136     7.10   0.000     .5636175    .9932951
  ------------+----------------------------------------------------------------
  lrhom_un    |
          rol |  -.6979283   .1229438    -5.68   0.000    -.9388937   -.4569628
   infantmort |   .0103766    .017664     0.59   0.557    -.0242443    .0449975
          edu |   -.943187   1.365993    -0.69   0.490    -3.620485    1.734111
        unemp |  -.0006247   .0246389    -0.03   0.980    -.0489161    .0476667
     popdense |  -.0002536   .0000407    -6.24   0.000    -.0003333   -.0001739
     perurban |   .0220374   .0081108     2.72   0.007     .0061405    .0379343
     sexratio |  -.0116862   .0016501    -7.08   0.000    -.0149203   -.0084521
           i1 |  -.1829003   .2595086    -0.70   0.481    -.6915277    .3257271
           i2 |  -2.147406   .2317321    -9.27   0.000    -2.601593    -1.69322
           i3 |  -1.117033   .2591665    -4.31   0.000     -1.62499   -.6090764
           i4 |  -.5242672    .306436    -1.71   0.087    -1.124871    .0763363
           i5 |  -.1551632   .3379004    -0.46   0.646    -.8174358    .5071093
           i6 |  -.1448641   .2681197    -0.54   0.589    -.6703691    .3806408
           i7 |   1.865099   .2322908     8.03   0.000     1.409818    2.320381
           i8 |   -1.14247   .1385152    -8.25   0.000    -1.413955   -.8709852
           i9 |  -.5055737   .3178413    -1.59   0.112    -1.128531    .1173839
          i10 |  -.8505291   .2763688    -3.08   0.002    -1.392202   -.3088561
          i11 |   2.465026   .3334657     7.39   0.000     1.811445    3.118607
          i12 |  -.2474496   .2998798    -0.83   0.409    -.8352033     .340304
          i13 |  -.8013985   .2803951    -2.86   0.004    -1.350963   -.2518342
          i14 |  -.8021364   .4712893    -1.70   0.089    -1.725847    .1215737
          i15 |   1.437194   .5312887     2.71   0.007     .3958872    2.478501
          i16 |    1.16964   .2363977     4.95   0.000     .7063093    1.632971
          i17 |   2.187307   .2292338     9.54   0.000     1.738017    2.636597
          i18 |  -.9397758   .1704912    -5.51   0.000    -1.273932   -.6056191
          i19 |  -1.600514   .4011908    -3.99   0.000    -2.386834   -.8141947
          i20 |  -.0143268     .42525    -0.03   0.973    -.8478014    .8191478
          i21 |  -1.113388   .6905857    -1.61   0.107    -2.466911    .2401351
          i22 |   .2347566   .2435712     0.96   0.335    -.2426341    .7121473
          i23 |   .9880283   .2297638     4.30   0.000     .5376995    1.438357
          i24 |   .9958523   .4754069     2.09   0.036     .0640719    1.927633
          i25 |   .2179717   .2141417     1.02   0.309    -.2017383    .6376817
          i26 |  -1.435595    .287879    -4.99   0.000    -1.999828   -.8713627
          i27 |   1.437117   .2075234     6.93   0.000     1.030378    1.843855
          i28 |   1.075874   .1722586     6.25   0.000     .7382529    1.413494
          i29 |  -.8421109   .2505761    -3.36   0.001    -1.333231   -.3509907
          i30 |  -.5403709   .1884527    -2.87   0.004    -.9097315   -.1710103
          i31 |  -.7265799   .1879081    -3.87   0.000    -1.094873   -.3582868
          i32 |  -.2802508   .3048357    -0.92   0.358    -.8777179    .3172162
          i33 |    .727064   .2814928     2.58   0.010     .1753483     1.27878
          i34 |   .3050649    .232945     1.31   0.190    -.1514989    .7616288
          i35 |   1.954881    .250828     7.79   0.000     1.463267    2.446494
          i36 |   .8506519   .2196168     3.87   0.000     .4202108    1.281093
          i37 |  -.5531778   .2242375    -2.47   0.014    -.9926752   -.1136804
          i38 |   .4644033   .2909359     1.60   0.110    -.1058205    1.034627
          i39 |  -.2737862   .1989065    -1.38   0.169    -.6636357    .1160633
          i40 |    .131238   .3055109     0.43   0.668    -.4675523    .7300284
          i41 |  -.1638677   .2619245    -0.63   0.532    -.6772302    .3494948
          i42 |  -.9553005    .386389    -2.47   0.013    -1.712609   -.1979919
          i43 |  -1.049853   .2753494    -3.81   0.000    -1.589528   -.5101778
          i44 |   1.373442   .3143306     4.37   0.000     .7573651    1.989518
          i45 |   1.684517   .2986952     5.64   0.000     1.099085    2.269949
          i46 |  -.5867953   .5731019    -1.02   0.306    -1.710054    .5364637
          i47 |   1.913632    .321416     5.95   0.000     1.283668    2.543596
          i48 |  -.4732782   .1734263    -2.73   0.006    -.8131875   -.1333688
          i49 |  -1.121342   .2792268    -4.02   0.000    -1.668616   -.5740669
          i50 |   .2927411   .3327521     0.88   0.379     -.359441    .9449233
          i51 |   .0500121   .2721914     0.18   0.854    -.4834733    .5834975
          i52 |   -.409393   .2305526    -1.78   0.076    -.8612678    .0424818
          i53 |  -1.225876   .1825716    -6.71   0.000    -1.583709   -.8680417
          i54 |    2.46872   .1853666    13.32   0.000     2.105408    2.832032
          i55 |  -1.738016   .2197896    -7.91   0.000    -2.168796   -1.307236
          i56 |   .2413554   .2625405     0.92   0.358    -.2732145    .7559253
          i57 |  -1.230822   .2899967    -4.24   0.000    -1.799205   -.6624387
          i58 |  -.1033214   .3247697    -0.32   0.750    -.7398584    .5332155
          i59 |  -.9550664   .1931834    -4.94   0.000    -1.333699   -.5764338
          i60 |  -1.012782   .3088928    -3.28   0.001    -1.618201   -.4073632
          i61 |   -1.03656    .284963    -3.64   0.000    -1.595078    -.478043
          i62 |   .4966512   .2191666     2.27   0.023     .0670925    .9262099
          i63 |     1.0587    .222165     4.77   0.000     .6232648    1.494135
          i64 |   -.686262   .2487223    -2.76   0.006    -1.173749   -.1987752
          i65 |  -.0789883   .4905169    -0.16   0.872    -1.040384    .8824072
          i66 |  -.5499591   .2240308    -2.45   0.014    -.9890515   -.1108667
          i67 |  -.4531491   .1985192    -2.28   0.022    -.8422395   -.0640586
          i68 |   .6450796   .2598514     2.48   0.013     .1357803    1.154379
          i69 |   .5770695   .2295774     2.51   0.012     .1271061    1.027033
          i70 |     .38317   .2184925     1.75   0.079    -.0450674    .8114075
          i71 |    .490844   .2681003     1.83   0.067    -.0346231    1.016311
          i72 |  -.2698329   .3169014    -0.85   0.395    -.8909482    .3512824
          i73 |  -1.394699   .2185931    -6.38   0.000    -1.823133    -.966264
          i74 |  -.7288951   .7428982    -0.98   0.327    -2.184949    .7271587
          i75 |  -.6907949   .1622951    -4.26   0.000    -1.008887   -.3727024
          i76 |   1.605976   .4231733     3.80   0.000     .7765719    2.435381
          i77 |  -.4261901   .3731779    -1.14   0.253    -1.157605    .3052252
          i78 |    -.45462   .2487887    -1.83   0.068    -.9422369    .0329969
          i79 |  -.1807794   .3107903    -0.58   0.561    -.7899171    .4283583
          i80 |   .3436948    .247209     1.39   0.164     -.140826    .8282155
          i81 |  -.4649191   .2726741    -1.71   0.088    -.9993505    .0695124
          i82 |  -.4510757   .5802821    -0.78   0.437    -1.588408    .6862562
          i83 |   .9092752   .1495411     6.08   0.000     .6161801     1.20237
          i84 |   .6266572   .3995945     1.57   0.117    -.1565337    1.409848
          i85 |   .5443738   .2033031     2.68   0.007      .145907    .9428407
          i87 |    .569356   .2430337     2.34   0.019     .0930187    1.045693
          i88 |  -.7977471   .2201042    -3.62   0.000    -1.229143   -.3663509
        _cons |    1.68471   1.419644     1.19   0.235    -1.097741    4.467161
--------------+----------------------------------------------------------------
    var(e.rol)|   .5988426   .0570085                      .4969129    .7216808
var(e.lrhom~n)|   .2835118   .0644225                      .1816152     .442578
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'    addnote(`iv2'->rol)
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR03-MedModel-UNODC.xml
dir : seeout

. 
. //      #13
. //      save and close 
. note:  Hertiage heritage -> infant unable to find maximum | `note'.

. note:  Mediation models | `note'. 

. notes

_dta:
  1.  Cleaned WHO homicide data for overall, age and gender | merged data
      together | |meg | 03-23-2023 | CT01-DataMerge-V02.
  2.  30JUN2022
  3.  Got data out of .csv into .dta, merged data, and generated variables | \
      06-28-2022 \ SP01-CleaningData.
  4.  Completed sample and pre-model diagnostics | | 05-05-25 |
      MAR02-SampDiag-UNODC.
  5.  Hertiage heritage -> infant unable to find maximum | | 07-05-23| Cleaned
      06-06-24 | MAR03-MedModel-UNODC.
  6.  Mediation models | | 07-05-23| Cleaned 06-06-24 | MAR03-MedModel-UNODC.

ryoung:
  1.  (pop1519*1000)+(pop2024*1000)/pop *100

rmyoung:
  1.  (mpop1519*1000)+(mpop2024*1000)+(mpop2529*1000)/popmale*100 | \ 06-28-2022
      \ SP01-CleaningData.

edu:
  1.  (eys_index+mys_index)/2 | \ 06-28-2022 \ SP01-CleaningData.

unemp:
  1.  Nation Estimates then missing filled with ILO estimates corr 1 or .9457 |
      \ 06-28-2022 \ SP01-CleaningData.

sexratio:
  1.  popmale/popfemale*100 | \ 06-28-2022 \ SP01-CleaningData.

eys_index:
  1.  (eys-0)/(18+0) | \ 06-28-2022 \ SP01-CleaningData

mys_index:
  1.  (mys-0)/(15+0) | \ 06-28-2022 \ SP01-CleaningData

lrhom_un:
  1.  | 05-05-25 | MAR02-SampDiag-UNODC.

. save `file'.dta, replace 
(file MAR03-MedModel-UNODC.dta not found)
file MAR03-MedModel-UNODC.dta saved

. log close 
      name:  <unnamed>
       log:  /Volumes/rdss_meghrogers/Current Research/Markets-Pridemore/Work/MA
> R03-MedModel-UNODC.log
  log type:  text
 closed on:   5 May 2025, 14:13:24
--------------------------------------------------------------------------------
